﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="my_orders.aspx.cs" Inherits="my_orders" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DB %>" SelectCommand="get_my_orders" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:SessionParameter Name="user" SessionField="UID" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="uid,order_no" DataSourceID="SqlDataSource1" BorderWidth="0px">
        <Columns>
            <asp:BoundField DataField="uid" HeaderText="uid" ReadOnly="True" SortExpression="uid" Visible="False"/>
            <asp:BoundField DataField="order_time" HeaderText="订单时间" SortExpression="order_time" />
            <asp:TemplateField HeaderText="订单号" SortExpression="order_no">
                <ItemTemplate>
                    <a href='order.aspx?pnr=<%# Eval("order_no") %>'><%# Eval("order_no") %></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="status" HeaderText="status" SortExpression="status" Visible="false"/>
            <asp:BoundField DataField="contact" HeaderText="联系人" SortExpression="contact" />
            <asp:BoundField DataField="email" HeaderText="电子邮件" SortExpression="email" />
            <asp:BoundField DataField="mobile_phone" HeaderText="移动电话" SortExpression="mobile_phone" />
            <asp:BoundField DataField="pay_port" HeaderText="支付端口" SortExpression="pay_port" />
            <asp:BoundField DataField="card_no" HeaderText="卡号" SortExpression="card_no" />
            <asp:BoundField DataField="card_holder" HeaderText="持卡人" SortExpression="card_holder" />
            <asp:BoundField DataField="currency" HeaderText="币种" SortExpression="currency" />
            <asp:BoundField DataField="total_paid" HeaderText="支付额" SortExpression="total_paid" />
            <asp:BoundField DataField="pay_time" HeaderText="支付时间" SortExpression="pay_time" />
            <asp:BoundField DataField="pay_id" HeaderText="支付编号" SortExpression="pay_id" />
        </Columns>
    </asp:GridView>
    <asp:Button ID="btnRefresh" runat="server" Text="刷新数据" /><br />
    <asp:Label ID="Label1" runat="server" Text="订单状态：*-失败，" Visible="False"></asp:Label>
</asp:Content>

